package com.meilingcloud.research.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.meilingcloud.common.annotation.Excel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 质控 对象 rws_quality_control
 *
 * @author chenl
 * @date 2021-05-10
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("rws_quality_control")
public class RwsQualityControl implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 质控ID
     */
    @TableId(value = "qc_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long qcId;

    /**
     * 质控名称
     */
    @Excel(name = "质控名称")
    private String qcName;

    /**
     * 质控描述
     */
    @Excel(name = "质控描述")
    private String qcDesc;

    /**
     * 质控状态
     */
    @Excel(name = "质控状态")
    private String qcState;

    /**
     * 质控结果
     */
    @Excel(name = "质控结果")
    private String qcResult;

    /**
     * 开始日期
     */
    @Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    /**
     * 结束日期
     */
    @Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    /**
     * 关闭原因
     */
    @Excel(name = "关闭原因")
    private String closeReason;

    /**
     * 删除标志
     */
    @TableLogic(value = "0", delval = "1")
    private String delFlag;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 开始事件区间
     */
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private List<Date> startDateRange;

    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();
}
